home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Languages
/
Caml Light 0.7
/
Caml Light 0.7 source
/
INSTALL (src)
< prev
next >
Wrap
Text File
|
1995-07-05
|
4KB
|
95 lines
RECOMPILING CAML LIGHT ON A MACINTOSH WITH MPW
To recompile Caml Light, you need at least a Macintosh II with 4 megabytes
of RAM, 10 megabytes of hard disk space, and MPW version 3.3.1 or 3.4b2.
You also need at least one C compiler (not necessarily Apple's compiler).
The configuration file contains pre-written configurations for the
following compilers:
- Apple's old compilers (C and PPCC)
- Apple's new compiler (MrC)
- Metrowerks' compilers (MWC68k and MWCPPC)
If you use MWC68k from CodeWarrior 6, you will need to apply
the patches found in the folder ":src:For Metrowerks Users".
- Symantec's compiler for 68k (SC, versions 7.0.3 and 7.0.5b2)
1- Edit the file :src:config. Change the variable definitions to where
to install the files and which C compilers to use. See the instructions
in the file itself for more details.
2- Set your "Commands" variable to include the folder :src:tools:
(put the absolute path name of this folder into "Commands").
3- From the :src: folder, type:
do make world
This builds all components of Caml Light for the first time. It takes
at least fifteen minutes. Ignore all warnings and error messages, unless
the "make" process stops. The "make" ends up with a little self-test.
Don't forget to check the results, as indicated.
4- To be sure everything works well, you can try to bootstrap the
system --- that is, to recompile all Caml Light sources with the newly
created compiler. From the :src: folder, type:
do make bootstrap
This takes slightly less time than the "make world" phase. The "make
bootstrap" checks that the bytecode programs compiled with the new
compiler are identical to the bytecode programs compiled with the old
compiler. If this is the case, you can be pretty sure the Caml Light
system has been correctly compiled. Otherwise, this does not
necessarily means something went wrong. The best thing to do is to try
a second bootstrapping phase: just "do make bootstrap" again. It will
either crash almost immediately, or re-re-compile everything correctly
and reach the fixpoint.
5- You can now install the Caml Light system. This will create the
following commands (in the directory set to BINDIR in :src:config):
camllight the interactive, toplevel-based tool
camlc the batch compiler
camlrun the runtime system
camlyacc the parser generator
camllex the lexer generator
camlmktop a tool to make toplevel systems that integrate
user-defined C primitives
From the :src: directory, type "do make install".
6- The directory where camlrun resides must be in the "Commands" variable
for camlc and camllight to work properly. (Actually, camlc and
camllight are shell-scripts that call "camlrun" on various
bytecode files.) Hence, if you have installed camlrun in a
non-standard directory, be careful to add it to the "Commands" variable
before running camlc or camllight.
7- The tools and libraries from the contrib/ directory in the Unix
version of Caml Light have not been ported to the Mac yet. Some of
them will be, at some point in the future.
8- Installation is complete. Time to clean up. Type "do make clean"
in the :src: directory.
COMMON PROBLEMS:
* If you're hacking the source and recompiling often, and you find that
"make depend" is too slow for your taste, and if you have MPW Perl and Sed
on your Mac, you can try to adapt the files found in the folder
":src:From Franklin Chen".
* camlc or camllight complain that camlrun cannot be found. Make sure
that the directory containing camlrun is in your "Commands" variable
(see point 6- above).
* You can safely ignore the various warnings given by the C compiler and
linker.
* If you have a Macintosh under A/UX or MachTen, you should use the Unix
version of Caml Light.